<?php

class Model_UserPrivilegeName extends Model {

	function getOption(){
		
		$data = $this->rmtSelect('*',"where `status`=1");
		foreach ($data as $datum){
			$ret[$datum['name']] = $datum['description'];
		}
		return $ret;
	}
	
	function getPrivilegeDescription($name){
		$options = $this->getOption();
		if(is_array($name)){
			foreach ($name as $key => $item){
				$name[$key] = $options[$item];
			}
		}else {
			$name =  $options[$name];
		}
		return $name;
	}
}
?>